// view/qiye/hylb/hylb.js
let app = getApp()
let yuming = app.globalData.yuming
const request = require('../../config/request');
Page({
  /**
   * 页面的初始数据
   */
  ...request,
  data: {
    heights: "",
    title: '行业类别',
    // list:[
    //   {img:'/images/my/shucai.png',name:'蔬菜市场'},
    //   {img:'/images/my/canyin.png',name:'餐饮企业'},
    //   {img:'/images/my/yiyao.png',name:'医药超市'},
    //   {img:'/images/my/jiudian.png',name:'酒店宾馆'},
    //   {img:'/images/my/shangchang.png',name:'商超商超'},
    //   {img:'/images/my/shequ.png',name:'社区物业'},
    //   {img:'/images/my/xiuxian.png',name:'休闲娱乐'},
    //   {img:'/images/my/ruye.png',name:'乳业乳品'},
    //   {img:'/images/my/youzhan.png',name:'油站气站'},
    //   {img:'/images/my/jingqu.png',name:'景区/游乐场'},
    //   {img:'/images/my/shengchan.png',name:'生产加工业'},
    //   {img:'/images/my/qita.png',name:'其他'},
    // ]
    shopType: '', //0个体 1企业
    mobile: '', //手机号
  },
  // 行业类别查询
  hylb() {
    var that = this
    this.myRequest(yuming + 'Besall/cartrelationList', {
      typeMold: 1
    }, 'POST').then(res => {
      that.setData({
        list: res.data.data
      })
    })
  },
  jin(e) {
    console.log(e)
    var id = e.currentTarget.dataset.id
    console.log(id)
    wx.navigateTo({
      url: '/page_zhu/zhuce/zhuce?hangyeid=' + id + "&shopType=" + this.data.shopType + "&mobile=" + this.data.mobile
    })
  },
  backs() {
    wx.navigateBack({
      delta: 0
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      heights: wx.getMenuButtonBoundingClientRect().top + 5,
      shopType: options.shopType,
      mobile: options.mobile
    })
    this.hylb()
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },
})